home *** CD-ROM | disk | FTP | other *** search
Gui4CLI script | 1980-01-03 | 2.4 KB | 90 lines |
- G4C
-
- ; ---- One window has a button which allows you to open another window.
- ; The second window really is a separate gui in its own right.
- ; It could have been handled in its own separate script, but
- ; here it serves as an example of using the NEWFILE command,
- ; which allows the script for the second gui to be contained
- ; within the file you are now reading.
- ; See below under NEWFILE.
-
- WinBig 100 -1 200 150 "Window.gc"
- WinType 11110001
- usetopaz
-
- BOX 0 0 0 0 OUT RIDGE
-
- xonLoad
-
- ; ----- The second button and the instructions are a
- ; distraction until the second window has been
- ; opened, so we hide them till needed.
- setgad Window.gc 1 HIDE
- setgad Window.gc 2 HIDE
- setgad Window.gc 3 HIDE
- setgad Window.gc 4 HIDE
- setgad Window.gc 5 HIDE
- GuiLoad Work:Tutorial/Window2.gc
- GuiOpen Window.gc
-
- xonClose
- ; ---- Just before we quit the main window, we quit
- ; the second one.
- GuiQuit Window2.gc
- GuiQuit Window.gc
-
- Text 20 25 160 12 "It's hot in here ..." 22 NOBOX
- xButton 20 40 160 12 'Open another Window'
- GuiOpen Window2.gc
-
- ; ---- As soon as the second window has been opened,
- ; the other button and the instructions need to
- ; be seen, and so we show them.
- setgad Window.gc 1 SHOW
- setgad Window.gc 2 SHOW
- setgad Window.gc 3 SHOW
- setgad Window.gc 4 SHOW
- setgad Window.gc 5 SHOW
- Redraw Window.gc
-
- xButton 38 120 104 12 'Now close it'
- gadid 1
- GuiClose Window2.gc
- setgad Window.gc 1 HIDE
- Redraw Window.gc
-
- Text 10 60 100 12 'Have a good look at' 20 NOBOX
- gadid 2
- Text 10 70 100 12 'the script. This is' 20 NOBOX
- gadid 3
- Text 10 80 100 12 'a bit more complicated' 23 NOBOX
- gadid 4
- Text 10 90 100 12 'than it looks.' 14 NOBOX
- gadid 5
-
-
- ; ------ THIS IS ANOTHER GUI - the new window, using NEWFILE
-
- NEWFILE Window2.gc
-
- WinBig 310 -1 200 50 "Window2.gc" ; Size, position, title
- WinType 11110001 ; System gadgets, etc
- usetopaz
-
- ; xonLoad
- ; NOTE - we can not have an xOnLoad command here, since this is a
- ; multi-gui file.. *Only* the xOnLoad commands of the 1st gui
- ; will be executed! - All other events are allowd though..
-
-
- Text 10 20 160 12 "I'm his kid brother..." 24 NOBOX
-
- ; ---- No 'onClose' here, because when it is closed we don't
- ; want it to do anything else, like GuiQuit.
- ; We keep it loaded in case we want to reopen it.
- ; Quitting for the second window is handled in the
- ; 'onClose' of the first window.
-
-
-
-